import 'package:flutter_levin/config/storage_manager.dart';

const String ktoken = 'token';

class TokenStore {
  static String getToken() {
    return StorageManager.localStorage!.getItem(ktoken) ?? '';
  }

  static setToken(String token) {
    StorageManager.localStorage!.setItem(ktoken, token);
  }

  static clearToken() {
    StorageManager.localStorage!.deleteItem(ktoken);
  }

  static bool hasToken() {
    return getToken().isNotEmpty;
  }
}
